package com.miao.config;

import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//minio配置类
@Configuration
public class MinioConfig {
    @Value("${minio.endpoint}")
    private String endpoint;
    @Value("${minio.accessKey}")
    private String accsessKey;
    @Value("${minio.secretKey}")
    private String serectKey;
    @Bean
    public MinioClient makeMinioClient() {
        return MinioClient.builder()
                .endpoint(endpoint)
                .credentials(accsessKey, serectKey)
                .build();
    }

}
